home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.02 Feb 91 / xserial source ƒ / wait.c < prev    next >
Encoding:
Text File  |  1990-07-27  |  305 b   |  17 lines  |  [TEXT/KAHL]

  1. /* waits for the specified number of seconds. should be used only
  2.  * for testing as this throws the program into a tight loop and 
  3.  * nothing else is done.
  4.  */
  5. wait(amount)
  6.     short    amount;
  7. {
  8.     long    start;
  9.     long    test;
  10.     
  11.     GetDateTime(&start);
  12.     do {
  13.         GetDateTime(&test);
  14.         }
  15.     while (test - start < amount);
  16. }
  17.